package com.dorm.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.ArrayList;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
public class Student extends BaseEntity {
    private Long id;
    private String studentNumber;
    private String name;
    private String gender;
    private String phone;
    private Long roomId;
    
    // 关联字段
    @JsonBackReference
    private Room room;
    
    @JsonManagedReference
    private List<DisciplinaryRecord> disciplinaryRecords = new ArrayList<>();
} 